package com.neusoft.oa.serviceImp;

import com.neusoft.oa.mapper.WriteMapper;
import com.neusoft.oa.pojo.Email;
import com.neusoft.oa.pojo.Percontact;
import com.neusoft.oa.service.IWriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WriteServiceImp implements IWriteService {
    @Autowired
    WriteMapper writeMapper;

    public List<Percontact> writeList(Percontact percontact){
        return writeMapper.writeList(percontact);
    }

    @Override
    public List<Percontact> checkList(String checkname) {
        return writeMapper.checkList(checkname);
    }

    @Override
    public boolean emailInsert(Email email) {
        int n=writeMapper.emailInsert(email);
        if (n>0)
            return true;
        return false;
    }
}
